9b6d7420eae77a2c07546e90ff8a92af50a4bfba,c/StructConstructor.java,StructConstructor,genStruct,#Ctx#,337

Before Change


                m.insn(ARETURN);
            }
            m.visitLabel(dflt);
            m.insn(POP2);
            m.insn(ACONST_NULL);
            m.insn(ARETURN);
            m.closeMethod();

After Change


        m.closeMethod();

        if (withParent != null) {
            m = st.newMethod(ACC_PUBLIC, "ref",
                             "(I[II)Ljava/lang/Object;");
            Label isConst = null;
            Label isVar = null;
            jumps = new Label[fieldCount];
            for (i = 0; i < fieldCount; ++i) {
                if (fields[i].inherited) {
                    jumps[i] = new Label();
                } else if (fields[i].mutable || fields[i].property > 0) {
                    if (isVar == null)
                        isVar = new Label();
                    jumps[i] = isVar;
                } else {
                    if (isConst == null)
                        isConst = new Label();
                    jumps[i] = isConst;
                }
            }
            dflt = new Label();
            next = new Label();
            m.load(0).load(2).varInsn(ILOAD, 3);
            m.varInsn(ILOAD, 1); // this idx at switch(field) { jumps }
            m.switchInsn(0, fieldCount - 1, dflt, null, jumps);
            if (isConst != null) {
                m.visitLabel(isConst);
                m.intConst(-1);
                m.insn(IASTORE);
                m.varInsn(ILOAD, 1);
                m.methodInsn(INVOKEVIRTUAL, cn, "get",
                             "(I)Ljava/lang/Object;");
                m.intConst(0);  // not hidden
            }
            m.visitLabel(next); // ret idx[1]
            m.varInsn(ISTORE, 1);
            m.load(2).varInsn(ILOAD, 3);
            m.intConst(1);
            m.insn(IADD);
            m.varInsn(ILOAD, 1);
            m.insn(IASTORE);    // ret idx[1]
            m.insn(ARETURN);